<?
session_start();
if (!isset($_SESSION[login])) {
     header("Location: HomeIndex.php");
     exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Manage Status Admin</title>
<meta charset="utf-8">
<meta name="description" content="Place your description here">
<meta name="keywords" content="put, your, keyword, here">
<meta name="author" content="Templates.com - website templates provider">
<link rel="stylesheet" href="css/reset.css" type="text/css" media="all">
<link rel="stylesheet" href="css/style.css" type="text/css" media="all">
<script type="text/javascript" src="js/jquery-1.4.2.min.js" ></script>
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<!--[if lt IE 7]>
     <link rel="stylesheet" href="css/ie/ie6.css" type="text/css" media="screen">
     <script type="text/javascript" src="js/ie_png.js"></script>
     <script type="text/javascript">
        ie_png.fix('.png, footer, header nav ul li a, .nav-bg, .list li img');
     </script>
<![endif]-->
<!--[if lt IE 9]>
  	<script type="text/javascript" src="js/html5.js"></script>
  <![endif]-->
</head>
<body id="page1">
<div class="wrap">
<!-- header -->
<header>
  <div class="container">
    <h1><a href="homeAdmin.php">Student Portfolio Management System</a></h1>
    <nav>
      <ul>
        <li><a href="homeAdmin.php" class="m1">หน้าแรก</a></li>
        <li><a href="searchAdmin.php" class="m1">ค้นหา</a></li>
        <li><a href="uploadAdmin.php" class="m1">อัพโหลด</a></li>
        <li class="current"><a href="manageAdmin.php" class="m3">จัดการข้อมูลเบื้องต้น</a></li>
        <li class="last"><a href="reportAdmin.php" class="m3">ออกรายงาน</a></li>
      </ul>
    </nav>
    <form action="" id="search-form">
      <fieldset>
        <div class="rowElem">
          <input type="text">
          <a href="#" onClick="document.getElementById('search-form').submit()">ค้นหา</a></div>
      </fieldset>
    </form>
  </div>
</header>
<div class="container">
<!-- aside -->
<aside>
  <div class="wrap"> 
    <!-- header -->
    <div class="container"> 
      <!-- aside -->
      <aside>
        <h2 align ="left">ยินดีต้อนรับ</h2>
		 <p><? echo $_SESSION["ses_name"]; ?></p>
        <input name="editSelf" type="button" value="แก้ไขข้อมูลส่วนตัว" onClick="window.location='editselfAdmin.php'"><br><br>
        <input name="logOut" type="button" value="ออกจากระบบ" onClick="window.location='logout.php'">
      </aside>
      <!-- content -->
      <section id="content">
        <div class="inside"> </div>
      </section>
    </div>
  </div>
</aside>
<!-- content -->
<section id="content">
<div class="inside">
<p class="style30">ระบบจัดการสถานะของผลงาน</p>
<hr />
<br>
<form method="post" action="insertStatus.php">
  <input type="text" name="status">
  <input type="submit" value="เพิ่ม">
</form>
<br>
<table border="1" width="400" cellspacing="0" cellpadding="5">
<tr bgcolor="#0099CC">
  <td width="150" height="30" valign="middle" bgcolor="#C2CFDF"><div align="center" class="style29"><b>สถานะของผลงาน</b></div></td>
  <td width="100" height="30" valign="middle" bgcolor="#C2CFDF"><div align="center" class="style29"><b>ลบสถานะ</b></div></td>
</tr>
<? require("connectdB.php");
  $tmp = "select * from project_status";
  $sql = mysql_query($tmp);
  while($result = mysql_fetch_array($sql))    { ?>
<tr>
  <td><? echo $result["project_status"]; ?></td>
  <td valign="middle" align="center"><a href="deleteStatus.php?type=<? echo $result["project_status"]; ?>">ลบ</a></td>
<tr>
  <? }
mysql_free_result($sql);
mysql_close($con);
?>
</body>
</html>
